/**
 * 请求拦截，设置token到请求头
 */
layui.use(['jquery'],function() {
    window.jQuery = window.$ = layui.jquery;
    if(!getTokenInfo().token) {
        window.top.location.href = '/login.html';
    } else {
        if((Date.now() - getTokenInfo().tokenExpireTime) > 0) {
            alert('request：会话已经过期，请重新登录')
            sessionStorage.clear()
            window.top.location.href = '/login.html'
            return;
        }
        ajaxSetup($);
    }

});

